import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ken
 * Date: 2023-11-02
 * Time: 11:04
 */
public class Test {
    public static void transform(int[] arry) {
       // int sum2 = 0;
        for(int i = 0;i < arry.length;i++) {
            arry[i] = arry[i] * 2;
        }
        //return sum2;
    }
    public static void main(String[] args) {
        int[] arry = {1,2,3,4,5,6};
        transform(arry);
        System.out.println(Arrays.toString(arry));
    }
    public static int sum(int[] arry) {
        int sum2 = 0;
        for(int i = 0;i < arry.length;i++) {
            sum2 += arry[i];
        }
        return sum2;
    }
    public static void main2(String[] args) {
        int[] arry = {1,2,3,4,5,6};
        int ret = sum(arry);
        System.out.println(ret);
    }
    public static double avg(int[] arry) {
        double sum = 0;
        for(int i = 0;i < arry.length;i++) {
            sum += arry[i];
        }
        return sum /arry.length;
    }
    public static void main1(String[] args) {
        int[] arry = {1,2,3,4,5,6};
        double ret = avg(arry);
        System.out.println(ret);
    }
}
